package cn.bgs.service;

import cn.bgs.common.R;
import cn.bgs.pojo.PaymentType;
import cn.bgs.vo.Bill;
import cn.bgs.pojo.User;
import cn.bgs.vo.Livingexpenses;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 缴费类型表(账单表) 服务类
 * </p>
 *
 * @author cf
 * @since 2022-06-07
 */
public interface IPaymentTypeService extends IService<PaymentType> {

    /**
     * 获取所有的缴费信息
     * @param id
     * @return
     */
    List<Livingexpenses> cfMypayment(Integer id);

    /**
     * 添加账单
     * @param paymentType
     * @return
     */
    int cfInsertPayment(PaymentType paymentType);

    /**
     * 获取账户余额
     * @param id
     * @return
     */
    User getUsermoney(Integer id);

    /**
     * 支付
     * @param paybalance
     * @return
     */
    int cfPayment(Double paybalance,Integer id);

    /**
     * 支付成功后改变payment_type状态
     * @param payId
     */
    void uupdatePaymentType(Integer payId);

    /**
     * 充值
     * @param newmoney
     * @param id
     * @return
     */
    int cfRecharge(Double newmoney, Integer id);

    /**
     * 查询所有支付账单
     * @param id
     * @return
     */
    List<PaymentType> cfGetAllcost(Integer id,String type,String month);
    R findBill(String paymentState,String type,String nameType,String name);

    R delBiil(Integer paymentTypeId);

    R addBill(Bill bill);

    R updateBill(Bill bill);

}
